package xin.clips.web.controller.socket;

import java.io.*;
import java.net.Socket;
import java.util.Scanner;

public class Client {
    public static void main(String[] args) {
        try {

            //1、创建客户端的Socket对象
            Socket socket = new Socket("localhost", 9527);

            //2、获取输出流，写数据
            OutputStream os = socket.getOutputStream();

            os.write("hellooo".getBytes());

            //3、释放资源
            socket.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}